<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>struts2简单的文件上传</title>
        <link href="${pageContext.request.contextPath}/css/mainframe.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="./js/prototype.js" ></script>
    </head>

<style>
body{
font-size:13px;
color:#333;
line-height:175%;
margin:0 auto;
background:#fff;
}
</style>
<body leftmargin="0" topmargin="0">
<s:debug/>
  <table border="0" width="100%" cellpadding="0" bgcolor="#ffffff">
   <tr> <td align="center">
   <div style="width:98%;">
    <fieldset><legend>文件上传</legend>
	<form name="form1" action='upload.action' method='post' enctype="multipart/form-data">
		<input type="file" name='file'/>
    </form>
     文件为：<img src="<s:property value="'upload/'+fileFileName"/>" width="100" height="50"/><br/>
     <a href="javascript:document.location.href='download.action?fileName=${fileFileName}'">下载</a><br/>
 	<s:property value="#typeError"/>
   </fieldset>   
   <div><button class="btn_input" onclick="form1.submit();"><img src="${pageContext.request.contextPath}/images/ico_chuli.png" />上传</button></div>  
</div></td></tr>
</table>
</body>
</html>